const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('creatQR_API', {
    readFile_Request: () => ipcRenderer.send('readFile'),
    readFile_Response: (callback) => ipcRenderer.on('readFile-response', (_event, data) => callback(data)),
    openFile: () => ipcRenderer.invoke('dialog:openFile'),
    getRouteFilePath: () => ipcRenderer.invoke('routeFilePath'),
    sendInsertFileBtnPoint: (x, y) => ipcRenderer.send('insertFileBtnPoiint', x, y),
})